//短信验证倒计时
function showtime(t){
	
	document.myform.phone.disabled=true;
	for(i=1;i<=t;i++) {
		window.setTimeout("update_p(" + i + ","+t+")", i * 1000);
	}

}
function update_p(num,t) {
	if(num == t) {
		document.myform.phone.value =" 重新发送 ";
		document.myform.phone.disabled=false;
	}
	else {
		printnr = t-num;
		document.myform.phone.value = " (" + printnr +")秒";
	}
}
$(function(){
//ie里面input文字兼容
       handlePlaceholderForIE();
});
function handlePlaceholderForIE() {
    // placeholder attribute for ie7 & ie8
    if (jQuery.browser.msie && jQuery.browser.version.substr(0, 1) <= 9) {

        // ie7&ie8
        jQuery('input[placeholder], textarea[placeholder]').each(function () {
            var input = jQuery(this);
            jQuery(input).val(input.attr('placeholder'));
            jQuery(input).focus(function () {
                if (input.val() == input.attr('placeholder')) {
                    input.val('');
                }
            });
            jQuery(input).blur(function () {
                if (input.val() == '' || input.val() == input.attr('placeholder')) {
                    input.val(input.attr('placeholder'));
                }
            });
        });
    }
}
